package poem_info2.domain;

import java.util.Objects;

public class Poem3 {
    private String title;
    private Integer dynasty_id;
    private Integer writer_id;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getDynasty_id() {
        return dynasty_id;
    }

    public void setDynasty_id(Integer dynasty_id) {
        this.dynasty_id = dynasty_id;
    }

    public Integer getWriter_id() {
        return writer_id;
    }

    public void setWriter_id(Integer writer_id) {
        this.writer_id = writer_id;
    }

    @Override
    public String toString() {
        return "Poem{" +
                "title='" + title + '\'' +
                ", dynasty_id=" + dynasty_id +
                ", writer_id=" + writer_id +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Poem3 poem = (Poem3) o;
        return Objects.equals(title, poem.title) && Objects.equals(dynasty_id, poem.dynasty_id) && Objects.equals(writer_id, poem.writer_id);
    }

}
